Enter list of recordfield names separated by commas
in order of the data in the file (Example: company,city,state):
reclist
Cancel
reclist
evaltest
There is no recordfield on the current background
named
Cancel
reclist
Choose the ASCII file type:
Delimited
Fixed
Cancel
Cancel
fixed
lengthlist
RecordField
Enter the number of characters it occupies on each line
of the file.
lengthlist
Cancel
lengthlist
Remove quotation marks from field values?
parseline
charsread
stripchars
parseline
ximportSummary
fline
crLoc
charsToRead
maxbuffer
charsRead
usingdefaults
filesize
reclist
filename
successcount
linecount
recordcount
stripquotes
filetype
lengthlist
linetot
parseline
stripchars
stripchars
delimited
Field count of line
does not match recordfield list given.
Continue
Cancel
Cancel
ximportsummary
y5newpage
stripchars
The length of line
of file
does not match total
characters indicated.
Continue
Cancel
Cancel
!import
y5newpage
stripspaces
charstart
summary
holder
reclist
linecount
recordcount
filename
successcount
stripquotes
filetype
lengthlist
linetot
fline
importSummary
Imported
out of
records from
linecount
filename
successcount
recordcount
stripchars
source
stripspaces
source
Begin import
4origcolor
"sign"
info
buttondown
buttonup
buttondown
60,50,100
origcolor
buttonup
origcolor
AAAA:
ToolBook always creates a brand new background when you use its native Import command. The scripts in the button on this background allow you to import values into any number of recordFields on the current background from ASCII delimited or fixed-field files.
When you click the button labeled "Begin Import," you will be prompted for an ASCII delimited or ASCII fixed-field file name. After entering the filename, you will be prompted for a list of recordField names. Try it out in this book by listing the recordFields "A" through "C." The files packaged with this book, ASCII.DEL and ASCII.FIX, are examples of the delimited and fixed-field file types. They each contain data for three fields.
To import ASCII delimited or fixed-field files into the background of your choice, simply copy the button labeled "Begin Import" to your background. nd.
asciihelp
buttonup
buttonup
asciihelp
fixedhelp
buttonup
buttonup
fixedhelp
delfile
buttonup
buttonup
delfile
fixedfile
buttonup
buttonup
fixedfile
asciihelp
fixedhelp
delfile
fixedfile
info
buttonup
buttonup
fixedfile
delfile
fixedhelp
asciihelp
Importing ASCII delimited or fixed-field data into the current background.ckground.
fixedhelp
In ASCII fixed-field files, the number of characters in each data field determines where one data field ends and another begins. This number is constant for each data field for each line of the file. Below is a sample from a fixed-field file. Notice that the data field "name" always occupies the first 20 characters of each line, followed by "date" which occupies characters 21 to 28 of each line, and so on.
Tom Jones 10/10/45Accounting
Ed Poe 03/23/54M.I.S.
The file called ASCII.FIX that comes with this book contains three data fields: the first occupies the first 20 characters of each line, the second takes up the next 8, and the third occupies the remaining 24 characters.24 characters. characters.
buttonup
buttonup
asciihelp
ASCII delimited refers to a standard file format in which the recordFields for each ToolBook page (or fields for each database record) occupy a single line in the file. The values on each line are separated by commas and are sometimes surrounded by quotation marks. Such files are created by ToolBook's Export command when "delimited" is specified. Below is a sample of an ASCII delimited file representing the data fields "name," "birthdate", and "department."
"Tom Jones","10/10/45","Accounting"
"Ed Poe","03/23/54","M.I.S."
The file ASCII.DEL that comes with this package contains three comma-delimited data fields.
buttonup
buttonup
delfile
"Ann Tyler",06/23/39,"Shipping"
"Barbara Bush",04/04/23,"Operations"
"Ginger Grant",03/05/45,"Sales"
"Jerry Mathers",04/02/90,"Telesales"
"Joe Petroni",12/04/38,"Aviation Mechanics"
"John Lydon",03/06/61,"Technical Support"
"Keith Partridge",08/04/53,"Technical Support"
"Marsha Brady",07/07/64,"Development"
"Martha Ray",09/30/31,"Operations"
"Nina Hagen",03/04/56,"Marketing"
"Sean Cassidy",08/03/45,"Sales"
"Shaft",01/31/71,"Security"
"Thurston Howell, III",09/23/45,"Finance"
"Tony Dow",05/06/40,"Shipping"
buttonup
buttonup
fixedfile
Ann Tyler 06/23/39Shipping
Barbara Bush 04/04/23Operations
Ginger Grant 03/05/45Sales
Jerry Mathers 04/02/90Telesales
Joe Petroni 12/04/38Aviation Mechanics
John Lydon 03/06/61Technical Support
Keith Partridge 08/04/53Technical Support
Marsha Brady 07/07/64Development
Martha Ray 09/30/31Operations
Nina Hagen 03/04/56Marketing
Sean Cassidy 08/03/45Sales
Shaft 01/31/71Security
Thurston Howell, III09/23/45Finance
Tony Dow 05/06/40Shipping
buttonup
buttonup
buttonup
buttonup
import
View script
RBreclist
20,8,24,
20,8,24,
"Do you want
delete
"Yes"
buttonup
buttonup
Do you want to delete all pages from the background?